package com.company.cloud.user.modules.app.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.company.cloud.common.bean.BasePageParam;
import com.company.cloud.common.bean.LoginSimpleUserInfo;
import com.company.cloud.common.bean.LoginUserInfo;
import com.company.cloud.user.modules.app.controller.req.CheckInvitationParam;
import com.company.cloud.user.modules.mgr.controller.req.UserUpdateParam;
import com.company.cloud.user.modules.app.models.UserCompanyModel;
import com.company.cloud.user.modules.base.entity.UserInfo;
import com.company.cloud.user.modules.base.entity.UserInvitationInfo;
import com.company.cloud.user.modules.cache.models.UserInvitationModel;

public interface UserAppService {
	
	
	/**更新用户信息*/
	public LoginUserInfo update(UserUpdateParam param, LoginSimpleUserInfo userInfo);

	/**更新用户邀请信息*/
	public void updateWithRole(UserInfo userInfo, UserInvitationInfo invitationId, LoginSimpleUserInfo loginUserInfo);
	
	/**更新手机号*/
	public void updateMobile(Integer id,String mobile,LoginSimpleUserInfo userInfo);
	
	
	/**更新密码*/
	public void updateUserPassword(Integer id,String oldPassword,String newPassword, LoginSimpleUserInfo userInfo);
	
	/**更新分享码*/
	public LoginUserInfo updateShareCode(LoginSimpleUserInfo userInfo);
	
	/**根据手机号获取用户信息*/
	public UserCompanyModel getUserCompany(String mobile);
	/**根据令牌获取手机号*/
	public String getMobileByToken(String token,boolean isDel);

	/**获取用户的密码邀请信息*/
	public IPage<UserInvitationModel> getPasswordInvitation(BasePageParam page, LoginSimpleUserInfo userInfo);

	/**获取用户的密码邀请信息*/
	public UserInvitationModel getPasswordInvitationNew(LoginSimpleUserInfo userInfo);

	/**获取用户的密码邀请信息by id*/
	public UserInvitationModel getPasswordInvitationById(Integer id);

	/**验证用户的密码邀请信息*/
	public UserInfo checkInvitation(CheckInvitationParam param, LoginSimpleUserInfo userInfo);


}
